select($_GET["id"]); if(isset($_GET["idioma"])) $idioma = $_GET["idioma"]; if(isset($_GET["nombre"])) $nombre = $_GET["nombre"]; else $nombre = $obj->getNombre(); if($idioma == 0) $path_doc = "descargas/esp/"; elseif ($idioma == 1) $path_doc = "descargas/eng/"; elseif ($idioma == 2) $path_doc = "descargas/fra/"; //echo $path_doc.$obj->getPath(); if(is_file($path_doc.$obj->getPath())){ $manager = new FileManager($obj->getPath()); $f = $manager->createFile($path_doc); $f = $manager->download($obj->getPath(),$nombre.'.pdf',$path_doc,NULL,true); //download($file,$p=NULL,$ext=NULL,$not=true) } elseif ($idioma == 2 || $idioma == 1){ $path_doc = "descargas/esp/"; if(is_file($path_doc.$obj->getPath())){ $manager = new FileManager($obj->getPath()); $f = $manager->createFile($path_doc); $f = $manager->download($obj->getPath(),$nombre.'.pdf',$path_doc,NULL,true); } else { echo "Se produjo un error al intentar descargar el archivo. Perdone las molestias."; } } else { echo "Se produjo un error al intentar descargar el archivo. Perdone las molestias."; } ?>